package com.lz.spring.cloud.study.control;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

import com.lz.spring.cloud.study.entity.User;

@RestController
public class UserControl {

	private static final Logger LOG = LoggerFactory.getLogger(UserControl.class);

	@GetMapping("/user/{id}")
	public User findById(@PathVariable Long id){
		LOG.info("=====findById=====");
		User user = new User();
		user.setId(id);
		user.setName("name_" + id);
		return user;
	}
}
